/*
 * @Author: 白川 杏 baiyufeisteam@163.com
 * @Date: 2023-04-12 08:23:12
 * @LastEditors: 白川 杏 baiyufeisteam@163.com
 * @LastEditTime: 2023-06-12 14:50:09
 * @FilePath: \homeworkFinal\vueproject\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router'
//引用我们创建的文件
import LoginPage from '@/components/LoginPage'
import User from '@/components/UserLogin'
import UserInfo from '@/components/UserInfo'
import MyCrops from '@/components/MyCrops'
import RecordList from '@/components/RecordList'
import RecordListImg from '@/components/RecordListImg'
import News from '@/components/NewsStored'
import BackGround from '@/components/BackGround'
import Tags from '@/components/TagsPage'
import Coin from '@/components/CoinInfo'
import Sign from '@/components/SignInfo'
import UserFlowerPot from '@/components/UserFlowerPot'
import FlowerPot from '@/components/FlowerPot'
import Collect from '@/components/CollectInfo'
import NewsImg from '@/components/NewsImg'
import NewsComment from '@/components/NewsComment'
import Buy from '@/components/BuyInfo'
import BuyDesc from '@/components/BuyDesc'
import GoodsComment from '@/components/GoodsComment'
import Order from '@/components/OrderInfo'
import UserReceive from '@/components/UserReceive'
import GrowTime from '@/components/GrowTime'
import CommentImg from '@/components/GoodsCommentImg'
import TipsOfficial from '@/components/TipsOfficial'
import AddTipsOfficial from '@/components/AddTipsOfficial'
import GrowTip from '@/components/GrowTip'
import AdminInfo from '@/components/AdminInfo'
import PlantsWiper from '@/components/PlantsWiper'

export const routes = [
    {
        path: '/',
        name: 'loginpage',
        component: LoginPage
    },
    //这里设置一个新的路由地址
    //登录成功后跳转到的默认页
    {
        path: '/user',
        name: 'User',
        component: User
    },
    //用户个人信息管理页
    {
        path: '/userinfo',
        name: 'UserInfo',
        component: UserInfo
    },
    //mycrops我的作物页
    {
        path: '/mycrops',
        name: 'MyCrops',
        component: MyCrops
    },
    //recordlist生长记录页
    {
        path: '/recordlist',
        name: 'RecordList',
        component: RecordList
    },
    //recordlistimg生长记录图片页
    {
        path: '/recordlistimg',
        name: 'RecordListImg',
        component: RecordListImg
    },
    //news页
    {
        path: '/news',
        name: 'News',
        component: News
    },
    //newsimg页
    {
        path: '/newsimg',
        name: 'NewsImg',
        component: NewsImg
    },
    //newscomment动态评论页
    {
        path: '/newscomment',
        name: 'NewsComment',
        component: NewsComment
    },
    //tag页
    {
        path: '/tags',
        name: 'Tags',
        component: Tags
    },
    //background背景图片页
    {
        path: '/background',
        name: 'BackGround',
        component: BackGround
    },
    //sign
    {
        path: '/sign',
        name: 'Sign',
        component: Sign
    },
    //coin
    {
        path: '/coin',
        name: 'Coin',
        component: Coin
    },
    //userflowerpot用户自己的花盆
    {
        path: '/userflowerpot',
        name: 'UserFlowerPot',
        component: UserFlowerPot
    },
    //flowerpot 花盆
    {
        path: '/flowerpot',
        name: 'FlowerPot',
        component: FlowerPot
    },
    //collect 收藏
    {
        path: '/collect',
        name: 'Collect',
        component: Collect
    },
    //buy商品页
    {
        path: '/buy',
        name: 'Buy',
        component: Buy
    },
    //buydesc商品描述
    {
        path: '/buydesc',
        name: 'BuyDesc',
        component: BuyDesc
    },
    //goodscomment商品评论
    {
        path: '/commentimg',
        name: 'CommentImg',
        component: CommentImg
    },
    //commentimg商品评论图片
    {
        path: '/goodscomment',
        name: 'GoodsComment',
        component: GoodsComment
    },
    //order订单
    {
        path: '/order',
        name: 'Order',
        component: Order
    },
    //userreceive用户收货地址
    {
        path: '/userreceive',
        name: 'UserReceive',
        component: UserReceive
    },
    //growtime 植物的生长阶段所需天数
    {
        path: '/growtime',
        name: 'GrowTime',
        component: GrowTime
    },
    //TipsOfficial 官方动态贴士页
    {
        path: '/tipsofficial',
        name: 'TipsOfficial',
        component: TipsOfficial
    },
    //AddTipsOfficial 添加官方动态贴士
    {
        path: '/addtipsofficial',
        name: 'AddTipsOfficial',
        component: AddTipsOfficial
    },
    //GrowTip
    {
        path: '/growtip',
        name: 'GrowTip',
        component: GrowTip
    },
    {
        path: '/admininfo',
        name: 'AdminInfo',
        component: AdminInfo
    },
    //PlantsWiper
    {
        path: '/plantswiper',
        name: 'PlantsWiper',
        component: PlantsWiper
    },
]

const router = createRouter({
    mode: 'history',
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router;